import { http } from '@/utils/http.ts'
import type { ProfileDetail, ProfileParam } from '@/types/member'

export const getProfileApi = () => {
  return http<ProfileDetail>({
    url: '/member/profile',
    method: 'GET',
  })
}

// 修改用户信息
export const updateProfileApi = (data: ProfileParam) => {
  return http<ProfileDetail>({
    url: '/member/profile',
    method: 'PUT',
    data,
  })
}
